home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-30 | 33.5 KB | 1,030 lines |
- Newsgroups: comp.sources.x
- Subject: v14i008: olvwm - Open Look Virtual Window Manager, Patch2, Part02/03
- Date: 27 Aug 91 06:00:04 GMT
- References: <csx-14i007-olvwm@uunet.UU.NET>
- Patch-To: olvwm: Volume 12, Issues 57-72
- Patch-To: olvwm: Volume 14, Issues 6
- Submitted-by: sdo@soliado.East.Sun.COM (Scott Oaks - Sun Consulting NYC)
-
- *** build/olvwm.man Sat Jun 22 20:09:01 1991
- --- src/olvwm.man Sat Jun 22 20:56:21 1991
- ***************
- *** 1,5 ****
- ! .\" @(#)olvwm.1 1.3 olvwm version 4/17/91
- ! .TH OLVWM 1 "31 March 1991"
- .SH NAME
- olvwm \- OPEN LOOK virtual window manager for OpenWindows
- .SH SYNOPSIS
- --- 1,5 ----
- ! .\" @(#)olvwm.man 1.4 olvwm version 6/22/91
- ! .TH OLVWM 1 "17 June 1991"
- .SH NAME
- olvwm \- OPEN LOOK virtual window manager for OpenWindows
- .SH SYNOPSIS
- ***************
- *** 80,115 ****
- .LP
- This window manager also includes David Plotkin's auto-pinned root menu
- resources.
- ! .SH MOVING WINDOWS
- .LP
- ! You move windows on the screen just as you normally would in
- ! .B olwm.
- ! You can also drag windows from the screen into the virtual desktop manager
- ! or from the virtual desktop manager to the screen, or just within the
- ! virtual desktop manager. Note that if you select on a window's frame
- ! which is overlapping the virtual desktop manager you will end up dragging
- ! the window into the virtual desktop manager. You can set the
- ! AllowMoveIntoDesktop resource to false if you are bothered by this
- ! behaviour.
- ! .SH MANIPULATING THE VIRTUAL DESKTOP
- .LP
- ! If you select a window inside the virtual desktop manager, you can move
- ! the window. If, however, you select the background area of the virtual
- ! desktop manager within the viewing rectangle, you can move the viewing
- ! rectangle of the desktop. When you release the mouse button, the
- ! desktop will shift and you will now see the windows within the
- ! virtual desktop manager's viewing rectangle.
- .LP
- ! You can also use the arrow keys to move the viewing rectangle and affect
- ! your view. If the virtual desktop manager has the keyboard focus,
- ! simply press the right arrow to move your view into the desktop to
- ! the right, etc. If your set the allowArrowInRoot resource to true (which,
- ! in fact, is it's default value), then arrows keys will work when the
- ! root window has the keyboard focus as well.
- .LP
- ! You can use the arrow keys when the virtual desktop manager has been
- ! iconified (though you must keep track mentally of where on the desktop
- ! you are).
- .SH RESIZING THE VIRTUAL DESKTOP
- .LP
- You can use the resize corners on the virtual desktop manager to resize
- --- 80,188 ----
- .LP
- This window manager also includes David Plotkin's auto-pinned root menu
- resources.
- ! .SH EVENTS IN THE VDM
- .LP
- ! The processing of events within the VDM depends on whether the mouse is
- ! pointing to the background area of the VDM or to a particular virtual window
- ! within the VDM.
- ! .SH EVENTS ON VIRTUAL WINDOWS
- .LP
- ! Events which occur in a particular virtual window behave just as if they
- ! were delivered to the real application's frame. Thus, pressing the MENU
- ! button over a virtual window will bring up the frame menu and allow the
- ! real (and virtual) windows to be opened, closed, fullsized, etc. Pressing
- ! the SELECT button will select that real (and virtual) window; pressing the
- ! ADJUST button will add (or subtract) that window from the selection list.
- ! Pressing the FRONT or OPEN keys will raise/lower or open/close the real
- ! (and virtual) window.
- .LP
- ! SELECTing and dragging one or more virtual windows will move the real and
- ! virtual windows (just as in
- ! .B olwm
- ! ). Note that if you drag the mouse outside of the VDM, the window can be
- ! moved within to the current (visible) desktop. Conversely, when dragging
- ! a window on the screen, if the mouse moves into the VDM, the window will then
- ! be moved to the location on the displayed within the VDM. Some users find
- ! this behaviour annoying; it can be turned off by setting the
- ! AllowMoveIntoDesktop resource to False. Note that if a frame is obscuring
- ! the VDM and you select/drag on that frame, it will be dragged into the VDM
- ! immediately.
- .LP
- ! Note that events are delivered ONLY to the real application's frame. Thus,
- ! typing characters or the COPY/CUT/PASTE keys has no effect.
- ! .SH EVENTS ON THE VDM BACKGROUND
- ! .LP
- ! Events on the VDM background all work to move the visible desktop, bringing
- ! windows which were formerly outside of the viewing area onto the screen (and
- ! moving windows which were on the screen outside of the viewing area).
- ! Keyboard events are described given the default Sun-4 keyboard mappings,
- ! but you can use xmodmap to set up your particular keyboard.
- ! .LP
- ! The actions associated with Keyboard Events in the VDM Background also occur
- ! for Keyboard events when the root window has the keyboard focus. In addition,
- ! if the META key is held down (the diamond key on Sun keyboards), then
- ! the action will occur regardless of where the keyboard focus is located.
- ! .LP
- ! Note: if you must remap
- ! a non-Sun keyboard, the arrow events are XK_Left, XK_Right, XK_Up, and
- ! XK_Down; the diagonal events are XK_R7 [up/left], XK_R9 [up/right], XK_R13
- ! [down/left], XK_R15 [down/right], and XK_R11 [upper-left corner]. The function
- ! keys are XK_F1 to XK_F10. The
- ! META key is the ModMap1 key.
- ! .LP
- ! 1) ARROW KEYS AND NUMERIC KEYPAD KEYS
- ! .LP
- ! The arrow keys move the visible region in the specified direction. In
- ! addition, the R keys on the numeric keypad around the arrow keys move the
- ! visible region diagonally according to their position. This is intuitive
- ! from a graphical viewpoint, though the key labels are awkward: Home moves
- ! the visible area up and right; PgUp moves it up and left; etc. Finally, the
- ! key in the middle of this pad (the R11 or 5 key) moves the visible region
- ! to the uppermost-leftmost position in the VDM.
- ! .LP
- ! Key movement occurs in screen-sized increments. If the SHIFT key is held
- ! down while the motion key is pressed, movement will be in 2-screen increments.
- ! If the CTRL key is held down, movement will be in 1/2-screen increments.
- ! If both are held down, movement will be in 20-screen increments, which is
- ! effectively to the appropriate edge of the VDM. Note that if the visible
- ! region is not aligned on a logical screen boundary, using the arrow keys
- ! will not position it on such a boundary.
- ! .LP
- ! 2) FUNCTION KEYS
- ! .LP
- ! The Function Keys F1 to F10 move the visible region to a logical screen
- ! numbered 1 to 10. Logical screen are numbered from the upper-left corner
- ! by column and then by row. The CTRL key adds 10 to the logical screen
- ! number (i.e. screen 11 can be reached with CTRL-F1). The SHIFT key adds
- ! 20 to the logical screen number. Both together adds 30 to the logical
- ! screen number. [If you're running on a 4/490 and have 41 screens full of
- ! windows, you're out of luck.]
- ! .LP
- ! On Sun Keyboards without a Help Key, the F1 key is normally mapped to the
- ! Help key. To support both Sun-3 and Sun-4 keyboards, the default .xinitrc
- ! file provided by Sun's OpenWindows product maps this key regardless of
- ! the type of keyboard you have. The upshot of this is that if you want
- ! the F1 key to move windows within olvwm, you must take out the line in
- ! your .xinitrc file which calls xmodmap for F1. Alternately, you can get
- ! to logical screen number 1 with the R11 key.
- ! .LP
- ! 3) SELECT MOUSE EVENTS
- ! .LP
- ! SELECTing on the VDM background allows you to drag the visible region within
- ! the VDM. If the VirtualGrid resource is set to Visible or Invisible, movement
- ! of the visible region will be constrained to logical screen boundaries
- ! unless the CTRL button is pressed before and held while dragging the mouse.
- ! If the VirtualGrid resource is set to None, movement of the visible region
- ! will be unconstrained unless the CTRL button is pressed before and held while
- ! dragging the mouse.
- ! .LP
- ! Double clicking on an area in the VDM background will move the visible region
- ! to the logical screen containing the point where the mouse was double-clicked.
- ! .LP
- ! 4) MENU MOUSE EVENTS
- ! .LP
- ! The MENU button brings up a (pinnable) menu which will allow movement based
- ! on the arrow keys described above.
- .SH RESIZING THE VIRTUAL DESKTOP
- .LP
- You can use the resize corners on the virtual desktop manager to resize
- ***************
- *** 129,153 ****
- .LP
- Windows which are "sticky" never move position on the screen when you
- change your view into the desktop. To set a particular window as
- ! sticky, simply select "Stick" in it's frame menu. You may similarly
- ! unstick the window via it's menu.
- .LP
- [Note: Only
- ! base frames are eligible to become sticky; frames inherit the stickyness
- of their base frames. Thus, for a particular application, either
- all windows are sticky or none of them are. The exception to this is
- that base frames created after a base frame is set to be "sticky" are created
- ! as unsticky. For most OPEN LOOK applications, this affects only pin-up
- ! menus; you should pin any menus you want to be sticky BEFORE you set
- ! the base frame to be sticky.]
- .LP
- ! Windows are sticky by default it their class name (set via the WM_CLASS)
- ! property is in the list of strings for VirtualSticky (see RESOURCES below)
- .SH PLACING WINDOWS
- .LP
- ! If you specify a window placement directly (via -Wp arguments or
- ! X11 geometry screens), the window will appear at that location on
- ! the virtual desktop (even if that location is not currently visible).
- .LP
- If you do not specify a window position, then
- .B olvwm
- --- 202,237 ----
- .LP
- Windows which are "sticky" never move position on the screen when you
- change your view into the desktop. To set a particular window as
- ! sticky, simply select "Stick" in its frame menu. You may similarly
- ! unstick the window via its menu.
- .LP
- [Note: Only
- ! base frames are eligible to become sticky; other frames inherit the stickyness
- of their base frames. Thus, for a particular application, either
- all windows are sticky or none of them are. The exception to this is
- that base frames created after a base frame is set to be "sticky" are created
- ! as unsticky.]
- .LP
- ! Windows are sticky by default if their class name (set via the WM_CLASS),
- ! their instance name (set via WM_INSTANCE), or their actual name (set via
- ! the WM_NAME)
- ! property is in the list of strings for VirtualSticky (see RESOURCES below).
- ! For tools which have a multi-word WM_NAME (e.g. Mailtool, which has a
- ! WM_NAME of Mail Tool - /var/spool/mail/user), use only the first word
- ! (e.g. Mail).
- ! .LP
- ! In OPENLOOK applications, you cannot set the WM_INSTANCE or WM_CLASS of a
- ! tool, but its
- ! name may be set with the -name command-line and, for some tools, interactively
- ! as well. The WM_NAME is displayed in the window's header.
- .SH PLACING WINDOWS
- .LP
- ! The placing of windows is subject to the RelativePosition resource
- ! below. Basically, when this is true (its default)
- ! windows at startup can be placed anywhere, so absolute positions can be given
- ! in your .openwin-init (or .xinitrc) file. Then, when starting windows
- ! interactively, they will be brought up on the current screen in a position
- ! based on the specified position modulus the screen size.
- .LP
- If you do not specify a window position, then
- .B olvwm
- ***************
- *** 255,266 ****
- .TP
- .BI VirtualBackgroundMap " (Pixmap filename)"
- The name of a file containing a pixmap to use as the background of the
- ! virtual desktop manager. This item, if present, takes precedence over
- ! the VirtualBackgroundColor.
- .I
- Default value: unused
- .P
- .TP
- .BI AutoShowRootMenu " (Bool)"
- If true, the root menu will come up pinned at start up.
- .I
- --- 339,356 ----
- .TP
- .BI VirtualBackgroundMap " (Pixmap filename)"
- The name of a file containing a pixmap to use as the background of the
- ! virtual desktop manager. This will be drawn with the VirtualBackgroundColor
- ! as its background color and the VirtualPixmapColor as its foreground color.
- .I
- Default value: unused
- .P
- .TP
- + .BI VirtualPixmapColor " (color specification)"
- + See above.
- + .I
- + Default value: white
- + .P
- + .TP
- .BI AutoShowRootMenu " (Bool)"
- If true, the root menu will come up pinned at start up.
- .I
- ***************
- *** 288,293 ****
- --- 378,423 ----
- .I
- Default value: Null
- .P
- + .TP
- + .BI RelativePosition " (boolean)"
- + If true, then user-specified window co-ordinates are assumed to be relative
- + to the current view into the desktop; otherwise they are absolute with
- + respect to the desktop. Setting to true will not allow you to bring up
- + windows outside your current view, and setting to false will break some
- + programs which save window states in an odd manner.
- + .I
- + Default value: True
- + .P
- + .TP
- + .BI GrabVirtualKeys " (boolean)"
- + If true, allows the META key to be used in conjunction with arrow/function
- + keys when moving windows: the desktop will move no matter where keyboard
- + focus happens to be at the time. This obviates the need to move the mouse
- + onto the root to use the arrow keys to move the desktop. But this may
- + potentially conflict with some applications, in which case it must be set
- + to false.
- + .I
- + Default value: True
- + .P
- + .TP
- + .BI VirtualGrid " (Visible, Invisible, or None)"
- + This controls two aspects of the VDM: If it's visible or invisible, the
- + grid is on (but it's only drawn if it's visible). If it's None, the grid
- + is off.
- + .TP
- + If the grid is on, the VDM may only be resized in logical screen-sized
- + increments. Otherwise, it may resized to arbitrary sizes. If the grid
- + is on, SELECT/dragging the mouse within the VDM will constrain the move to
- + logical screens (unless the CTRL button is held down); if the grid is off,
- + moving the visible screen region with SELECT/drag will be unconstrained
- + (unless the CTRL button is held down).
- + .I
- + Default value: Visible
- + .TP
- + .BI VirtualGridColor " (color specification)"
- + If the VirtualGrid is Visible, it will be drawn in this color.
- + .I
- + Default value: Same as VirtualFontColor
- .\" ========================================================================
- .SH COPYRIGHTS
- .LP
- ***************
- *** 309,317 ****
- .br
- Portions may be (c) 1990 Solbourne Computers.
- .br
- Please see the LEGAL_NOTICES file for full disclosure of copyright
- information.
- !
- .\" ========================================================================
- .SH BUGS
- .LP
- --- 439,463 ----
- .br
- Portions may be (c) 1990 Solbourne Computers.
- .br
- + Portions not covered under the above copyrights are (c) 1991 Scott Oaks.
- + .br
- Please see the LEGAL_NOTICES file for full disclosure of copyright
- information.
- ! .SH CREDITS
- ! .\" =======================================================================
- ! .LP
- ! Most of the code in this application comes from release 2.0 of olwm,
- ! authored at Sun Microsystems and distributed in the contrib section
- ! of MIT's X11R4.
- ! .br
- ! The virtual desktop section was authored by Scott Oaks.
- ! who is responsible for its maintenance. Please direct any comments to
- ! scott.oaks@sun.com. This code is not supported by Sun Microsystems in
- ! any way.
- ! .br
- ! Notwithstanding the above, the staff at Sun Microsystems, and especially
- ! Stuart Marks, deserves credit as original author of olwm for most of the
- ! work contained in this application.
- .\" ========================================================================
- .SH BUGS
- .LP
- ***************
- *** 320,332 ****
- resource RefreshRecursively to False in order to get refreshes on the
- virtual desktop to work correctly.
- .LP
- - New frames should inherit the stickyness of their parent.
- - .LP
- The virtual desktop manager icon is, in the words of an office mate,
- ``pretty lame.'' Better yet, though, it should show feedback so it's
- ! possible to tell when on the desktop you are when it's closed.
- .LP
- ! Need a way for base windows to be sticky on creation (but I don't
- ! like tvtwm's method of having particular applications sticky).
- ! .LP
- ! Probably scores more; this was a weekend-type hack after all :-).
- --- 466,473 ----
- resource RefreshRecursively to False in order to get refreshes on the
- virtual desktop to work correctly.
- .LP
- The virtual desktop manager icon is, in the words of an office mate,
- ``pretty lame.'' Better yet, though, it should show feedback so it's
- ! possible to tell where on the desktop you are when it's closed.
- .LP
- ! Probably scores more; this was a spare-time hack after all :-).
- *** build/resources.c Sat Jun 22 20:52:44 1991
- --- src/resources.c Sat Jun 22 20:56:15 1991
- ***************
- *** 6,12 ****
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)resources.c 1.6 olvwm version 5/9/91";
-
- /*
- * Based on
- --- 6,12 ----
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)resources.c 1.7 olvwm version 6/22/91";
-
- /*
- * Based on
- ***************
- *** 72,77 ****
- --- 72,79 ----
- static Bool setBeepResource();
- extern Bool updIconLocation();
- extern Bool updBorderColor();
- + extern Bool UpdVirtualGrid();
- + extern Bool SetGridResource();
-
- Bool UpdInputFocusStyle();
-
- ***************
- *** 219,225 ****
- &(GRV.VirtualBackgroundColor), VirtualSetColor, UpdVirtualBgColor },
- { ".virtualBackgroundMap", ".VirtualBackgroundMap", NULL,
- &(GRV.VirtualBackgroundMap), setCharResource, UpdVirtualMap },
- ! { ".virtualIconGeometry", ".VirtualIconGeometry", "0x0",
- GRV.VirtualIconGeometry, setStringResource, UpdVirtualIconGeometry},
- { ".virtualForegroundColor", ".VirtualForegroundColor", "-1",
- &(GRV.VirtualForegroundColor), VirtualSetColor, UpdVirtualFgColor },
- --- 221,227 ----
- &(GRV.VirtualBackgroundColor), VirtualSetColor, UpdVirtualBgColor },
- { ".virtualBackgroundMap", ".VirtualBackgroundMap", NULL,
- &(GRV.VirtualBackgroundMap), setCharResource, UpdVirtualMap },
- ! { ".virtualIconGeometry", ".VirtualIconGeometry", "",
- GRV.VirtualIconGeometry, setStringResource, UpdVirtualIconGeometry},
- { ".virtualForegroundColor", ".VirtualForegroundColor", "-1",
- &(GRV.VirtualForegroundColor), VirtualSetColor, UpdVirtualFgColor },
- ***************
- *** 235,245 ****
- &(GRV.VirtualIconic), setBoolResource, (BFuncPtr) 0 },
- { ".virtualSticky", ".VirtualSticky", "",
- &(GRV.StickyList), setMinimalDecor, (BFuncPtr)0 },
- };
-
- /* private data */
-
- ! static Bool matchString();
- static Bool matchBool();
- static Bool matchFocusType();
- static Bool matchIconPlace();
- --- 237,257 ----
- &(GRV.VirtualIconic), setBoolResource, (BFuncPtr) 0 },
- { ".virtualSticky", ".VirtualSticky", "",
- &(GRV.StickyList), setMinimalDecor, (BFuncPtr)0 },
- + { ".relativePosition", ".RelativePosition", "True",
- + &(GRV.RelativePosition), setBoolResource, (BFuncPtr)0 },
- + { ".grabVirtualKeys", ".GrabVirtualKeys", "True",
- + &(GRV.GrabVirtualKeys), setBoolResource, (BFuncPtr)0 },
- + { ".virtualPixmapColor", ".VirtualPixmapColor", NULL,
- + &(GRV.VirtualPixmapColor), VirtualSetColor, UpdVirtualMap },
- + { ".virtualGrid", ".VirtualGrid", "Visible",
- + &(GRV.VirtualGrid), SetGridResource, UpdVirtualGrid },
- + { ".virtualGridColor", ".VirtualGridColor", "Black",
- + &(GRV.VirtualGridColor), VirtualSetColor, UpdVirtualGrid },
- };
-
- /* private data */
-
- ! Bool matchString();
- static Bool matchBool();
- static Bool matchFocusType();
- static Bool matchIconPlace();
- ***************
- *** 256,262 ****
- * Determine whether value matches pattern, irrespective of case.
- * This routine is necessary because not all systems have strcasecmp().
- */
- ! static Bool
- matchString( value, pattern )
- char *value;
- char *pattern;
- --- 268,274 ----
- * Determine whether value matches pattern, irrespective of case.
- * This routine is necessary because not all systems have strcasecmp().
- */
- ! Bool
- matchString( value, pattern )
- char *value;
- char *pattern;
- ***************
- *** 918,924 ****
- NewS = newValue;
- if ( varSet )
- {
- ! if ( NewS == RMTable[rmIndex].varAddr )
- return( updateNeeded );
- else
- updateNeeded = True;
- --- 930,937 ----
- NewS = newValue;
- if ( varSet )
- {
- ! /*if ( NewS == RMTable[rmIndex].varAddr )*/
- ! if (!strcmp(NewS, RMTable[rmIndex].varAddr))
- return( updateNeeded );
- else
- updateNeeded = True;
- *** build/resources.h Sat Jun 22 20:08:49 1991
- --- src/resources.h Sat Jun 22 20:56:16 1991
- ***************
- *** 6,12 ****
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! /* @(#)resources.h 1.4 olvwm version 4/17/91 */
-
- /* based on @(#) resources.h 25.14 90/05/31 Crucible */
-
- --- 6,12 ----
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! /* @(#)resources.h 1.5 olvwm version 6/22/91 */
-
- /* based on @(#) resources.h 25.14 90/05/31 Crucible */
-
- ***************
- *** 114,120 ****
- #define RM_AUTOROOTMENUY 62
- #define RM_VIRTUALICONIC 63
- #define RM_STICKYWINDOWS 64
- ! #define RM_ENTRYEND 65 /* number of entries in table */
-
- /* resource set functions */
- static Bool setBoolResource();
- --- 114,125 ----
- #define RM_AUTOROOTMENUY 62
- #define RM_VIRTUALICONIC 63
- #define RM_STICKYWINDOWS 64
- ! #define RM_RELATIVEPOSITION 65
- ! #define RM_GRABVIRTUALKEYS 66
- ! #define RM_VIRTUALPIXMAPCOLOR 67
- ! #define RM_VIRTUALSHOWGRID 68
- ! #define RM_VIRTUALGRIDCOLOR 69
- ! #define RM_ENTRYEND 70 /* number of entries in table */
-
- /* resource set functions */
- static Bool setBoolResource();
- *** build/services.c Sat Jun 22 20:09:35 1991
- --- src/services.c Sat Jun 22 20:56:16 1991
- ***************
- *** 6,12 ****
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)services.c 1.3 olvwm version 4/17/91";
-
- /*
- * Based on
- --- 6,12 ----
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)services.c 1.4 olvwm version 6/22/91";
-
- /*
- * Based on
- ***************
- *** 518,526 ****
- for (i = 0; i < argc; i++) {
- print_quoted_word(SaveFile, argv[i]);
- putc(' ', SaveFile);
- - putc('&', SaveFile);
- - putc('\n', SaveFile);
- }
- XFreeStringList(argv);
- }
- }
- --- 518,526 ----
- for (i = 0; i < argc; i++) {
- print_quoted_word(SaveFile, argv[i]);
- putc(' ', SaveFile);
- }
- + putc('&', SaveFile);
- + putc('\n', SaveFile);
- XFreeStringList(argv);
- }
- }
- ***************
- *** 736,741 ****
- --- 736,743 ----
- int state;
-
- {
- + if (cli->groupid == VDM)
- + return NULL;
- cli->sticky = state;
- if (cli->sticky) {
- cli->iconwin->fcore.menu = &IconFullMenuSticky;
- ***************
- *** 836,842 ****
- break;
-
- case FFA_STICKY:
- ! MakeSticky(cli, ~cli->sticky);
- if (cli->groupmask == GROUP_LEADER)
- GroupApply(cli->groupid, MakeSticky,
- cli->sticky, GROUP_DEPENDENT);
- --- 838,844 ----
- break;
-
- case FFA_STICKY:
- ! MakeSticky(cli, !cli->sticky);
- if (cli->groupmask == GROUP_LEADER)
- GroupApply(cli->groupid, MakeSticky,
- cli->sticky, GROUP_DEPENDENT);
- ***************
- *** 953,959 ****
- break;
-
- case FFA_STICKY:
- ! MakeSticky(cli, ~cli->sticky);
- if (cli->groupmask == GROUP_LEADER)
- GroupApply(cli->groupid, MakeSticky,
- cli->sticky, GROUP_DEPENDENT);
- --- 955,961 ----
- break;
-
- case FFA_STICKY:
- ! MakeSticky(cli, !cli->sticky);
- if (cli->groupmask == GROUP_LEADER)
- GroupApply(cli->groupid, MakeSticky,
- cli->sticky, GROUP_DEPENDENT);
- *** build/slots.c Sat Jun 22 20:09:18 1991
- --- src/slots.c Sat Jun 22 20:56:17 1991
- ***************
- *** 6,12 ****
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)slots.c 1.2 olvwm version 3/30/91";
-
- /* based on @(#) slots.c 1.5 90/05/15 Crucible */
-
- --- 6,12 ----
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)slots.c 1.3 olvwm version 6/22/91";
-
- /* based on @(#) slots.c 1.5 90/05/15 Crucible */
-
- ***************
- *** 45,54 ****
-
- #define PLUSINFINITY 0xfffffff /* REMIND fix this for architecture-independence */
-
- - #ifdef BRAP
- - extern int VirtualDesktopHeight, VirtualDesktopWidth, VirtualDesktopX, VirtualDesktopY;
- - #endif
- -
- /***************************************************************************
- * Local functions
- ***************************************************************************/
- --- 45,50 ----
- ***************
- *** 231,239 ****
- /* setIconPos -- given a slot, position the icon frame window accordingly.
- */
- static void
- ! setIconPos(win, slot)
- WinIconFrame *win;
- IconSlot *slot;
- {
- int x,y;
-
- --- 227,236 ----
- /* setIconPos -- given a slot, position the icon frame window accordingly.
- */
- static void
- ! setIconPos(win, slot,adj_x, adj_y)
- WinIconFrame *win;
- IconSlot *slot;
- + int adj_x, adj_y;
- {
- int x,y;
-
- ***************
- *** 286,292 ****
- }
- }
-
- ! (WinFunc(win,core.newposfunc))(win,x,y);
- }
-
- /* incrPositionedSlots -- an icon has been explicitly positioned; create an
- --- 283,289 ----
- }
- }
-
- ! (WinFunc(win,core.newposfunc))(win, x + adj_x, y + adj_y);
- }
-
- /* incrPositionedSlots -- an icon has been explicitly positioned; create an
- ***************
- *** 416,432 ****
- {
- int nhoriz, nvert; /* number of slots occupied, horizontally & vertically */
- int nmajor, nminor; /* number of slots occupied, in major & minor directions */
- IconSlot *slot;
-
- iconList = ListCons(winicon, iconList);
-
- if (positioned)
- {
- ! slot = incrPositionedSlots(winicon->core.x, winicon->core.y,
- winicon->core.width, winicon->core.height, snaptogrid);
- winicon->iconslot = slot;
- if (snaptogrid)
- ! setIconPos(winicon,slot);
- else
- (WinFunc(winicon,core.newposfunc))(winicon,winicon->core.x,winicon->core.y);
- }
- --- 413,435 ----
- {
- int nhoriz, nvert; /* number of slots occupied, horizontally & vertically */
- int nmajor, nminor; /* number of slots occupied, in major & minor directions */
- + int scr_x, scr_y;
- +
- IconSlot *slot;
- + Display *dpy = winicon->core.client->dpy;
-
- iconList = ListCons(winicon, iconList);
-
- if (positioned)
- {
- ! scr_x = abs(winicon->core.x % DisplayWidth(dpy,DefaultScreen(dpy)));
- ! scr_y = abs(winicon->core.y % DisplayHeight(dpy,DefaultScreen(dpy)));
- ! slot = incrPositionedSlots(scr_x, scr_y,
- winicon->core.width, winicon->core.height, snaptogrid);
- winicon->iconslot = slot;
- if (snaptogrid)
- ! setIconPos(winicon, slot,
- ! winicon->core.x - scr_x, winicon->core.y - scr_y);
- else
- (WinFunc(winicon,core.newposfunc))(winicon,winicon->core.x,winicon->core.y);
- }
- ***************
- *** 437,443 ****
- setMajorMinor(nvert, nhoriz, &nmajor, &nminor);
- slot = incrDynamicSlots(nmajor, nminor);
- winicon->iconslot = slot;
- ! setIconPos(winicon,slot);
- }
-
- return slot;
- --- 440,446 ----
- setMajorMinor(nvert, nhoriz, &nmajor, &nminor);
- slot = incrDynamicSlots(nmajor, nminor);
- winicon->iconslot = slot;
- ! setIconPos(winicon,slot,0,0);
- }
-
- return slot;
- *** build/states.c Sat Jun 22 20:09:33 1991
- --- src/states.c Sat Jun 22 20:56:17 1991
- ***************
- *** 9,15 ****
- * (Normal, Iconic, Withdrawn)
- */
-
- ! static char sccsid[] = "@(#)states.c 1.4 olvwm version 4/17/91";
-
- /*
- * Based on
- --- 9,15 ----
- * (Normal, Iconic, Withdrawn)
- */
-
- ! static char sccsid[] = "@(#)states.c 1.5 olvwm version 6/22/91";
-
- /*
- * Based on
- ***************
- *** 135,141 ****
- };
-
- typedef struct {
- ! char *class, *instance;
- } minimalclosure;
-
- /***************************************************************************
- --- 135,141 ----
- };
-
- typedef struct {
- ! char *class, *instance, *name;
- } minimalclosure;
-
- /***************************************************************************
- ***************
- *** 162,168 ****
- --- 162,182 ----
- return True;
- }
-
- + static Bool
- + matchInstClassName(str,mc)
- + char *str;
- + minimalclosure *mc;
- + {
- + if ((mc->class != NULL) && (!strcmp(str,mc->class)))
- + return True;
- + if ((mc->instance != NULL) && (!strcmp(str,mc->instance)))
- + return True;
- + if ((mc->name != NULL) && (!strncmp(str,mc->name,strlen(str))))
- + return True;
- + return False;
- + }
-
- +
- /*
- * getOlWinDecors - given the window attributes and decoration add/delete
- * requests, determine what kind of window (according to the OpenLook
- ***************
- *** 530,536 ****
- * we don't have a race condition in finding out.
- */
-
- ! if (!ourWinInfo && !IsVirtual(window))
- XSelectInput(dpy, window, StructureNotifyMask);
-
- /* get all the info about the new pane */
- --- 544,550 ----
- * we don't have a race condition in finding out.
- */
-
- ! if (!ourWinInfo && !IsVirtual(dpy, window))
- XSelectInput(dpy, window, StructureNotifyMask);
-
- /* get all the info about the new pane */
- ***************
- *** 662,668 ****
- */
- calcPosition(dpy, screen, &paneAttr);
- }
- ! else if (!fexisting && (normalHints->flags & USPosition)) {
- paneAttr.x += VirtualDesktopX;
- paneAttr.y += VirtualDesktopY;
- }
- --- 676,683 ----
- */
- calcPosition(dpy, screen, &paneAttr);
- }
- ! else if (!fexisting && (normalHints->flags & USPosition) &&
- ! !GRV.RelativePosition) {
- paneAttr.x += VirtualDesktopX;
- paneAttr.y += VirtualDesktopY;
- }
- ***************
- *** 756,762 ****
- /* figure out what focus mode this window intends */
- if ((cli->wmHints) && (cli->wmHints->input))
- {
- ! if (cli->protocols & TAKE_FOCUS)
- cli->focusMode = LocallyActive;
- else
- cli->focusMode = Passive;
- --- 771,783 ----
- /* figure out what focus mode this window intends */
- if ((cli->wmHints) && (cli->wmHints->input))
- {
- ! /*
- ! * Can't have the VDM locally active, since we'll end
- ! * up grabbing events away from ourself . . .
- ! */
- ! if (cli->groupid == VDM)
- ! cli->focusMode = GloballyActive;
- ! else if (cli->protocols & TAKE_FOCUS)
- cli->focusMode = LocallyActive;
- else
- cli->focusMode = Passive;
- ***************
- *** 774,782 ****
- else {
- mc.class = cli->wmClass;
- mc.instance = cli->wmInstance;
- ! if (ListApply(GRV.StickyList,matchInstClass,&mc) != NULL)
- cli->sticky = TRUE;
- else cli->sticky = FALSE;
- }
-
- /* officially set up the frame */
- --- 795,807 ----
- else {
- mc.class = cli->wmClass;
- mc.instance = cli->wmInstance;
- ! if (!XFetchName(dpy, window, &mc.name))
- ! mc.name = NULL;
- ! if (ListApply(GRV.StickyList,matchInstClassName,&mc) != NULL)
- cli->sticky = TRUE;
- else cli->sticky = FALSE;
- + if (mc.name)
- + XFree(mc.name);
- }
-
- /* officially set up the frame */
- ***************
- *** 838,845 ****
- if (cli->groupmask == GROUP_DEPENDENT)
- {
- Client *leader = GroupLeader(cli->groupid);
- ! if (leader != NULL)
- initstate = leader->wmState;
- }
-
- if (window == VDM)
- --- 863,874 ----
- if (cli->groupmask == GROUP_DEPENDENT)
- {
- Client *leader = GroupLeader(cli->groupid);
- ! if (leader != NULL) {
- initstate = leader->wmState;
- + cli->sticky = leader->sticky;
- + }
- + else if (cli->groupid == NoFocusWin)
- + cli->sticky = True;
- }
-
- if (window == VDM)
- *** build/usermenu.c Sat Jun 22 20:09:25 1991
- --- src/usermenu.c Sat Jun 22 20:56:18 1991
- ***************
- *** 6,12 ****
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)usermenu.c 1.2 olvwm version 3/30/91";
-
- /*
- * Based on
- --- 6,12 ----
- * Written for Sun Microsystems by Crucible, Santa Cruz, CA.
- */
-
- ! static char sccsid[] = "@(#)usermenu.c 1.3 olvwm version 6/22/91";
-
- /*
- * Based on
- ***************
- *** 184,190 ****
- --- 184,242 ----
- };
- Menu DefaultRootMenu = { "Workspace", RootButtons, 4, -1, True, (FuncPtr)MakeMenu};
-
- + char *
- + expand_path(s)
- + char *s;
-
- + {
- + char *t, *p_s, *p_t;
- + static char *delim = "!$^&*(){}';:<>?/.,\"`~[]";
- + int brace, len;
- + char env[256], *env_p, *getenv();
- +
- + t = (char *) calloc(1, strlen(s) + 1);
- + if (!t)
- + return NULL;
- +
- + for (p_s = s, p_t = t; *p_s; ) {
- + if (*p_s == '$') {
- + if (p_s[1] == '{') {
- + brace = True;
- + p_s = p_s + 2;
- + }
- + else {
- + brace = False;
- + p_s++;
- + }
- + len = strcspn(p_s, delim);
- + strncpy(env, p_s, len);
- + env[len] = '\0';
- + if ((env_p = getenv(env)) == NULL) {
- + /* better punt, but there's are error here somewhere */
- + if (brace) {
- + bcopy(p_s - 2, p_t, len + 2);
- + p_t += len + 2;
- + }
- + else {
- + bcopy(p_s - 1, p_t, len + 1);
- + p_t += len + 1;
- + }
- + p_s += len;
- + }
- + else {
- + t = (char *)
- + realloc(t, strlen(t) + strlen(p_s) + strlen(env_p) + 1);
- + strcat(t, env_p);
- + p_t += strlen(env_p);
- + }
- + p_s += len;
- + } /* } never match braces in vi */
- + else *p_t++ = *p_s++;
- + }
- + *p_t = '\0';
- + return t;
- + }
- +
- /*
- * Global routines
- */
- ***************
- *** 287,296 ****
- --- 339,350 ----
- int lineno = 1; /* Needed for recursion */
- int rval;
-
- + file = expand_path(file);
- stream = fopen(file, "r");
- if (stream == NULL) {
- if (messages)
- fprintf(stderr, "olvwm: can't open menu file %s\n", file);
- + free(file);
- return(MENU_NOTFOUND);
- }
-
- ***************
- *** 301,306 ****
- --- 355,361 ----
- else
- freeMenuData(menu);
-
- + free(file);
- return(rval);
- }
-
- --
- Dan Heller
- O'Reilly && Associates Z-Code Software Comp-sources-x:
- Senior Writer President comp-sources-x@uunet.uu.net
- argv@ora.com argv@zipcode.com
-